#-*-coding:utf-8-*-
'''
Created on 2012-6-6
C:/Users/zhaoyh/workspace/yfmis/addons/PF/Common/html.py
@author: zhaoyh
'''
import web
from config import render_mako
view=render_mako(directories=['templates/PF/lookup'],input_encoding='utf-8')
class enum():
    """主从枚举"""
    def POST(self,name):
        return view.enum(name=name)
    def GET(self,name): 
        return   self.POST(name)
class enum_html():
    """根据查询到的结果再组织是tree还是list，单选还是多选"""
    def POST(self,name):
        return view.enum(name=name)
    def GET(self,name): 
        return   self.POST(name)  
class enum_json():
    """主从枚举"""
    def POST(self,name):
        return view.enum(name=name)
    def GET(self,name): 
        return   self.POST(name)      

class enum_list():
    """主从枚举"""
    def GET(self,name):
        page=web.input(numPerPage=20,pageNum=1,keywords='',orderField='order_code',col='')
        if page.col=='' or page.col==None:
            col=['ee_code','ee_name']
        else:
            col=[page.col]
        list=PageList(Employee,page,page.orderField,page.numPerPage,page.pageNum,col,page.keywords)      
        return view.employee_list(list=list.getlist(),page=list.showPage(),title=compo_title)        
    
class add_enum():
    """主从枚举"""
    def POST(self,name):
        return view.enum(name=name)
    def GET(self,name): 
        return   self.POST(name) 
class del_enum():
    """主从枚举"""
    def POST(self,name):
        return view.enum(name=name)
    def GET(self,name): 
        return   self.POST(name)     
class edit_enum():
    """主从枚举"""
    def POST(self,name):
        return view.enum(name=name)
    def GET(self,name): 
        return   self.POST(name)   